﻿using FreeSql.DataAnnotations;
using Jumei.Common.BaseModel;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Jumei.Model.Business.GoodsManage
{
    /// <summary>
    /// 商品评价表
    /// </summary>
    [Table(Name = "gd_goods_cats")]
    [Index("idx_{tablename}_01", nameof(CatName) + "," + nameof(TenantId), true)]
    [Index("idx_{tablename}_02", nameof(CatName), false)]
    public class GoodsCatsEntity : EntityFull, ITenant
    {
        /// <summary>
        /// 租户Id
        /// </summary>
        [Column(Position = -10)]
        public long? TenantId { get; set; }

        /// <summary>
        /// 父ID
        /// </summary>
        public long ParentId { get; set; }

        /// <summary>
        /// 分类名称
        /// </summary>
        [Column(StringLength = 20)]
        public string CatName { get; set; }

        /// <summary>
        /// 是否显示
        /// </summary>
        public bool IsShow { get; set; }

        /// <summary>
        /// 是否显示楼层
        /// </summary>
        public bool IsFloor { get; set; }

        /// <summary>
        /// 排序号
        /// </summary>
        public bool CatSort { get; set; }

        /// <summary>
        /// 商品佣金比例
        /// -1代表使用上级父类的佣金设置
        /// </summary>
        public decimal CommissionRate { get; set; } = -1;

        /// <summary>
        /// 分类图片
        /// </summary>
        [Column(StringLength = 150)]
        public string CatImg { get; set; }

        /// <summary>
        /// 二级标题
        /// </summary>
        [Column(StringLength = 150)]
        public string SubTitle { get; set; }

        /// <summary>
        /// 移动端商品简称
        /// </summary>
        [Column(StringLength = 20)]
        public string SimpleName { get; set; }

        /// <summary>
        /// 分类SEO标题
        /// </summary>
        [Column(StringLength = 200)]
        public string SeoTitle { get; set; }

        /// <summary>
        /// 分类SEO关键字
        /// </summary>
        [Column(StringLength = 200)]
        public string SeoKeywords { get; set; }

        /// <summary>
        /// 分类SEO描述
        /// </summary>
        [Column(StringLength = 200)]
        public string SeoDes { get; set; }

        /// <summary>
        /// 电脑端商品列表模板名
        /// </summary>
        [Column(StringLength = 200)]
        public string CatListTheme { get; set; } = "goods_list";

        /// <summary>
        /// 电脑端商品详情模板名
        /// </summary>
        [Column(StringLength = 200)]
        public string DetailTheme { get; set; } = "goods_detail";

        /// <summary>
        /// 移动端商品列表模板名
        /// </summary>
        [Column(StringLength = 200)]
        public string MobileCatListTheme { get; set; } = "goods_list";

        /// <summary>
        /// 移动端商品详情模板名
        /// </summary>
        [Column(StringLength = 200)]
        public string MobileDetailTheme { get; set; } = "goods_detail";

        /// <summary>
        /// 微信端商品列表模板名
        /// </summary>
        [Column(StringLength = 200)]
        public string WechatCatListTheme { get; set; } = "goods_list";

        /// <summary>
        /// 微信端商品详情模板名
        /// </summary>
        [Column(StringLength = 200)]
        public string WechatDetailTheme { get; set; } = "goods_detail";

        /// <summary>
        /// 移动端列表显示方式
        /// 0：一行两个 
        /// 1：一行一个
        /// </summary>
        [Column(StringLength = 200)]
        public int ShowWay { get; set; }
    }
}
